package beanstao.util.type.base;

import java.util.Collection;
import java.util.Map;

import beanstao.util.exception.technical.util.reflect.FailToCastObjectException;
import beanstao.util.type.Castor;

@SuppressWarnings({ "unchecked", "rawtypes" })
public class Map2Collection extends Castor<Map, Collection>
{

	@Override
	public Collection cast(Map src, Class<?> toType, String... args) throws FailToCastObjectException
	{
		Collection coll = createCollection(src, toType);
		coll.add(src);
		return coll;
	}

}
